1. Field of the Invention
The present invention relates to a motor control apparatus which detects a position of a lens barrel driven by a motor by reading the position which is coded to control a stop position of the lens barrel based on the codes, and more precisely it relates to a lens driving motor control apparatus which has means for compensating for an abnormal or unusual code.
2. Description of Related Art
Recently, various cameras having a powered zoom lens with a macro function have been developed. In a powered zoom lens, a lens barrel is rotated and/or moved in the optical axis direction by a lens driving motor to adjust the focus or vary the focal length.
Usually, the lens barrel has a code plate which codes the angular or rotational position and the axial position of the lens barrel. The codes are read by brushes to detect the position of the lens barrel by the code processing. The motor is driven in a direction in accordance with a distance signal from an automatic focusing apparatus or a zoom signal from a zoom operation switch, so that the motor is stopped when the code corresponding to the above-mentioned signals is read to stop the lens barrel at a desired position.
Usually, the code is represented by a four bit binary signal comprising combination of "1" 's and "0" 's. The four bit code can represent 16 kinds of information. However, generally speaking, three codes, i.e., "0000", "1111"and "1000", which tend to be confused with other codes are not used.
On the other hand, the four bit code is constructed, e.g., by a code plate which has a row of codes consisting of a conductive portion and a non-conductive portion in combination and brushes which are brought into contact with the row of codes. The code plate is applied onto an outer periphery of the lens barrel and the brushes are secured to an immovable portion of a camera so as to make contact with the code plate. When the motor is driven to move the lens barrel, the brushes come into contact with the code plate to read the code and thereby detect the position of the lens barrel.
When the brushes are in contact with the code plate, a mis-contact may occur, resulting in a reading error. As a result, the above-mentioned three codes which are not usually used, may be read.
If such a reading error occurs, the code is reread when the operation of the motor is stopped or when other operation is necessitated. However, when the contact between the code plate and the brushes is worsened, the possibility of a reading error is increased, so that the motor must often be stopped.